import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')

  },
  {
    path: '/layout',
    component: () => import('@/views/Layout/index.vue'),
    children: [
      {
        path: '',
        name: 'shouye',
        component: () => import('@/views/shouye/index.vue')

      },
      {
        path: 'wenda',
        name: 'wenda',
        component: () => import('@/views/wenda/index.vue')

      },
      {
        path: 'shipin',
        name: 'shipin',
        component: () => import('@/views/shipin/index.vue')

      },
      {
        path: 'wode',
        name: 'wode',
        component: () => import('@/views/wode/index.vue')

      }
    ]
  }

]

const router = new VueRouter({
  routes
})

export default router
